// ShmReader.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"


#include "PersistentQ.h"

PersistentQ gPQ;

int main(int argc, char* argv[])
{
    bool bInitStat  =  false;
    do
    {
        cout << "Going to open Q for reading "<<endl;
        bInitStat = gPQ.init(szFileName,eReader);
        if (false == bInitStat)
        {
            break;
        }
        const int nRuncnt = 4024;

        for( int i = 0; i<nRuncnt; i++)
        {
            Data dt;
            bool bPopStatus =  false;
            bPopStatus = gPQ.GetFront(dt);
            if (true == bPopStatus)
            {
                cout<<"popded data " << dt.acData <<endl;
            }           
        }
    } while(0);
    return 0;
}

